-
Notifications
You must be signed in to change notification settings - Fork 34
Build a shared library for use with each test #294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ests and reusing it for each test.
With Open-Acidification/TankController#207 our tests went from 42:30 to 2:30! (Unfortunately, we've had to start using a fork of |
I like what's going on here but I'd feel more comfortable if we found a way to factor this a bit better. For example:
I can probably take a crack at this if you'd like |
As mentioned a moment ago in another PR, this is the remaining PR that I haven't merged and that is because I'm a bit hesitant, partly for the reasons you suggest (and partly because it doesn't give the speed improvements I anticipated). As long as this is unmerged, our TankController project will continue to use a fork (which is fine; we've been doing it for some months). So, yes, if you see what I'm trying to do and can find a way to factor it better, that would be wonderful. But, please don't feel an obligation to take my problems and try to solve them! |
This reverts commit e7c1098.
cee03c1
to
6a5cd78
Compare
Instead of recompiling all the source files for each test, we now build a single shared library with everything except the test and then compile the test and link to the shared library. When I test SampleProjects/TestSomething the time reduces from 2:25 to 0:48. On our TankControllerLib, this reduces the test time from 38:16 to 2:06, so a massive win!
I realize that I'm getting pretty deep into the internals, but it looks like I have it passing on Linux, macOS, and Windows.
Fix #227.